package com.asset.dispoal.file.casedispose;

import com.asset.dispoal.file.casedispose.api.FileCaseService;
import com.asset.dispoal.file.casedispose.dto.FileCaseAddDispocalRequest;
import com.asset.dispoal.file.casedispose.dto.FileCaseBatchEditRequest;
import com.asset.dispoal.file.casedispose.dto.FileCaseConditionRequest;
import com.asset.dispoal.file.casedispose.dto.FileCaseExecutionRequest;
import com.asset.dispoal.file.casedispose.dto.FileCaseJudgmentRequest;
import com.asset.dispoal.file.casedispose.dto.FileCaseMediationRequest;
import com.asset.dispoal.file.casedispose.dto.FileCaseRegisterRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tech.mhuang.pacebox.springboot.protocol.Result;

@RestController
@Api(value = "案件处置管理", tags = "案件处置管理")
@RequestMapping("file/casedispose")
public class FileCaseDisposeController {

    @Autowired
    private FileCaseService fileCaseService;

    @ApiOperation(value = "立案", notes = "立案")
    @PostMapping("register")
    public Result register(FileCaseRegisterRequest request) {
        return fileCaseService.register(request);
    }

    @ApiOperation(value = "判决", notes = "判决")
    @PostMapping("judgment")
    public Result judgment(FileCaseJudgmentRequest request) {
        return fileCaseService.judgment(request);
    }

    @ApiOperation(value = "执行", notes = "执行")
    @PostMapping("execution")
    public Result execution(FileCaseExecutionRequest request) {
        return fileCaseService.execution(request);
    }

    @ApiOperation(value = "补充单个类型下的文件", notes = "补充单个类型下的文件")
    @PostMapping("addSingleFile")
    public Result addSingleFile(FileCaseAddDispocalRequest request) {
        return fileCaseService.addSingleFile(request);
    }

    @ApiOperation(value = "调解", notes = "调解")
    @PostMapping("mediation")
    public Result mediation(FileCaseMediationRequest request) {
        return fileCaseService.mediation(request);
    }

    @ApiOperation(value = "条件导入", notes = "条件导入")
    @PostMapping("condition")
    public Result condition(FileCaseConditionRequest request) {
        return fileCaseService.condition(request);
    }

    @ApiOperation(value = "导入批量修改", notes = "导入批量修改")
    @PostMapping("batchEdit")
    public Result batchEdit(FileCaseBatchEditRequest request) {
        return fileCaseService.batchEdit(request);
    }
}